import os
import shutil

# Source and destination directory (you can change these paths)
source_dir = "C:\\Users\\jxk33\\Desktop\\images"
dest_dir = "C:\\Users\\jxk33\\Desktop\\images"

# Create destination directory if it doesn't exist
if not os.path.exists(dest_dir):
    os.makedirs(dest_dir)

# Loop through files 0-99 and create copies numbered 100-199
for i in range(100):
    # Source file name
    source_file = os.path.join(source_dir, f"dataimages_{i}.png")

    # Destination file name (adding 100 to the number)
    dest_file = os.path.join(dest_dir, f"dataimages_{i + 100}.png")

    try:
        # Copy the file
        shutil.copy2(source_file, dest_file)
        print(f"Copied {source_file} to {dest_file}")
    except FileNotFoundError:
        print(f"Warning: Source file {source_file} not found")
    except Exception as e:
        print(f"Error copying {source_file}: {str(e)}")

print("File copying completed!")